public with sharing class WeekPlanChoose {
    public String recordType {get;set;}
    public WeekPlanChoose(ApexPages.StandardController con) {
        List<Schema.RecordTypeInfo> recordTypes = Schema.SObjectType.Weekly_Plan__c.getRecordTypeInfos();
        System.debug(LoggingLevel.INFO, '*** recordTypes: ' + recordTypes);
        String defaultRecordType = '';
        Integer availableRTCount = 0;
        for(Schema.RecordTypeInfo rt : recordTypes){
            if(rt.isMaster()){
                continue;
            }
            if(rt.isAvailable()){
                recordType=rt.getName();
                availableRTCount++;
            }
            if(rt.isDefaultRecordTypeMapping()){
                defaultRecordType=rt.getName();
            }
        }
        if(availableRTCount>1){
            recordType=defaultRecordType;
        }
    }
}